<?php
header("content-type:text/html;charset=utf8");
$id = $_GET['id'];
$id2 = $id + 3;
$con = mysqli_connect('localhost', 'root', 'root', 'userdata');
mysqli_query($con, 'set names utf8');
$res = mysqli_query($con, "select src from img where id between $id and $id2");
$data = [];
while($row = mysqli_fetch_assoc($res)){
    $data[] = $row;
}
if ($data) {
    $arr = [
        "meta" => [
            "status" => 1,
            "msg" => "加载成功",
            "data" => $data,
        ]
    ];
} else {
    $arr = [
        "meta" => [
            "status" => 0,
            "msg" => "加载失败",
            "data" => "null",
        ]
    ];
}

echo json_encode($arr);
